<?php

if ( ! is_admin() ) { add_action( 'wp_enqueue_scripts', 'woothemes_add_javascript' ); }



if ( ! function_exists( 'woothemes_add_javascript' ) ) {

	function woothemes_add_javascript() {
		wp_enqueue_script( 'jquery' );
		wp_enqueue_script( 'jquery-ui-datepicker' );
        wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ) );
		//vietlancer: wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), '3.0.2' );
        wp_enqueue_script( 'jquery-validate', get_template_directory_uri() . '/js/jquery.validate.js', array( 'jquery' ) );
        wp_enqueue_script( 'function', get_template_directory_uri() . '/js/function.js', array( 'jquery' ) );
        wp_localize_script("function","ajaxurl", admin_url("admin-ajax.php"));
        
	}

}



//Add an HTML5 Shim

add_action( 'wp_head', 'html5_shim');



if (!function_exists('html5_shim')) {

	function html5_shim() { ?>

		<!--[if lt IE 9]>

			<script src="https://html5shim.googlecode.com/svn/trunk/html5.js"></script>

		<![endif]-->

		<?php

	}

}







?>